package com.example.demo.Service.Impl;

import com.example.demo.Dao.BusinessDao;
import com.example.demo.Entity.BusinessEntity;
import com.example.demo.Service.BusinessService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BusinessServiceImpl implements BusinessService {
    @Resource
    BusinessDao businessDao;

    @Override
    public List<BusinessEntity> get() {
        return businessDao.get();
    }

    @Override
    public BusinessEntity getByAccounts(String accounts) {
        return businessDao.getByAccounts(accounts);
    }

    @Override
    public int updateByAccounts(String accounts, String username,String password,String address,String telephone,String avatar,String license,String status) {
        return businessDao.updateByAccounts(accounts,username,password,address,telephone,avatar,license,status);
    }

    @Override
    public int addBusiness(String accounts, String username,String password,String address,String telephone,String avatar,String license) {
        return businessDao.addBusiness(accounts,username,password,address,telephone,avatar,license);
    }

    @Override
    public int deleteBusiness(String accounts){
        return businessDao.deleteBusiness(accounts);
    }
}
